package demo1;

import demo1.demo2.test.ServiceStudent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-04-23
 * Time: 20:30
 */
@Controller
public class ControllerStudent {

    private ServiceStudent serviceStudent;

    @Autowired
    public ControllerStudent(ServiceStudent serviceStudent) {
        this.serviceStudent = serviceStudent;
    }

    public void fun() {
        System.out.println("这是 demo2 包底下的 ControllerStudent");
        serviceStudent.fun();
    }
}
